Skip to content

Conversation

philliphoff
Copy link
Collaborator

@philliphoff philliphoff commented Sep 5, 2025

Moves the durable_openai_agent_orchestrator decorator to the DFApp class. This makes it easier for developers to find as well as eliminates logic needed to scan and find the FunctionApp instance in the startup file.

It appears that FunctionApp has duplicated durable-related methods on the DFApp, my guess to aid existing developers adding durable triggers to existing Functions apps. However, to add the decorator there would require an update to the Azure Functions Python SDK, not just this Azure Durable Functions Python SDK. This would be good to do, but shouldn't be a blocker.

@philliphoff philliphoff marked this pull request as ready for review September 5, 2025 22:50
@philliphoff philliphoff changed the title Move OpenAI decorator to FunctionApp class Move OpenAI decorator to DFApp class Sep 5, 2025

return wrap

def _create_invoke_model_activity(self, model_provider):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit concerned about bringing this much of OpenAI-related code directly into this file. Until now, all the code related to this integration was under the openai_agents folder, and I believe there is value in keeping it this way. Obviously, the entry point (durable_openai_agent_orchestrator) belongs to this class, but perhaps it can delegate to code remaining under openai_agents?

Copy link
Collaborator Author

@philliphoff philliphoff Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair, though I feel the app registration and "outer" activity/orchestration logic should live in this app type. I've moved the OpenAI-specific logic out.

@philliphoff philliphoff merged commit f769efc into durable-openai-agent Sep 9, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants